﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hangjing.EleAPI
{
    /// <summary>
    /// 订单详情接口实体
    /// </summary>
    public class eleOrder:BaseResultInfo
    {
        public OrderDetail data
        {
            set;
            get;
        }
    }


    public class OrderDetail
    {
        /// <summary>
        /// 
        /// </summary>
        public string address { get; set; }

        /// <summary>
        /// 张三 收货人
        /// </summary>
        public string consignee { get; set; }

        /// <summary>
        /// 下单时间
        /// </summary>
        public DateTime created_at { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime active_at { get; set; }

        /// <summary>
        /// 配送费
        /// </summary>
        public decimal deliver_fee { get; set; }

        /// <summary>
        /// 配送时间
        /// </summary>
        public DateTime? deliver_time { get; set; }

        /// <summary>
        /// 订单备注
        /// </summary>
        public string description { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Detail detail { get; set; }

        /// <summary>
        /// 发票抬头
        /// </summary>
        public string invoice { get; set; }

        /// <summary>
        /// 是否预订单
        /// </summary>
        public int is_book { get; set; }

        /// <summary>
        /// 是否在线支付
        /// </summary>
        public int is_online_paid { get; set; }

        /// <summary>
        /// 饿了么订单id
        /// </summary>
        public string order_id { get; set; }

        /// <summary>
        /// 	顾客联系电话
        /// </summary>
        public List<string> phone_list { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string tp_restaurant_id { get; set; }

        /// <summary>
        /// 餐厅id
        /// </summary>
        public int restaurant_id { get; set; }


        /// <summary>
        /// 是否需要发票，0-不需要，1-需要
        /// </summary>
        public int invoiced { get; set; }

        /// <summary>
        /// 餐厅名称
        /// </summary>
        public string restaurant_name { get; set; }

        /// <summary>
        /// 餐厅当日订单序号
        /// </summary>
        public int restaurant_number { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public int status_code { get; set; }

        /// <summary>
        /// 订单总价
        /// </summary>
        public decimal total_price { get; set; }

        /// <summary>
        /// 原始价格
        /// </summary>
        public decimal original_price { get; set; }


        /// <summary>
        /// 打包费
        /// </summary>
        public decimal package_fee { get; set; }
        


        /// <summary>
        /// 
        /// </summary>
        public string user_id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string user_name { get; set; }

        /// <summary>
        /// 订单收货地址经纬度
        /// </summary>
        public string delivery_geo { get; set; }

    }

    public class GroupItemItem
    {
        /// <summary>
        /// 
        /// </summary>
        public int category_id { get; set; }

        /// <summary>
        /// 狗不理
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public decimal price { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<string> garnish { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int quantity { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string tp_food_id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<string> specs { get; set; }

    }



    public class ExtraItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string description { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public decimal price { get; set; }

        /// <summary>
        /// 配送费
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int category_id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int quantity { get; set; }

    }



    public class Detail
    {
        /// <summary>
        /// 
        /// </summary>
        public List<List<GroupItemItem>> group { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<ExtraItem> extra { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public object abandoned_extra { get; set; }

    }

}
